<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/8/17 0017
  Time: 9:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>
<script src="${path}/static/taoshunda/user/user.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${path}/static/bootstrap/bootstrap-table/bootstrap-table.js"></script>


<div style="float: left"><input type="text" class="form-control entry" id="nick" placeholder="请输入用户昵称"></div>
<div style="float: left"><input type="text" id="start" class="form-control rangedate entry" placeholder="请输入用户注册时间"/>
</div>
<div style="float: left"><input type="text" id="end" class="form-control rangedate entry" placeholder="请输入用户登录结束时间"/>
</div>

<div style="float: left;margin-bottom: 5px;margin-left: 3px">
    <button type="submit" class="btn query_button" onclick="queryUserInfo()"
            style="float: left;width:150%;">
        <%--<span class="glyphicon glyphicon-search" aria-hidden="true"></span>--%>
        查询
    </button>
</div>

<table id="table"
       data-toggle="table"
       data-url="${path}/web/user/queryUserList"
       data-toolbar="#toolbar"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-field="id" data-visible="false">编号</th>
        <th data-field="account">用户账号</th>
        <th data-formatter="User.accountOrName">名称</th>
        <th data-field="created">创建时间</th>
        <th data-field="lastTime">最后登录时间</th>
        <th data-formatter="User.isCertificate">认证状态</th>
        <th data-formatter="User.status" data-events="operateEventes">启用/禁用</th>
        <th data-formatter="User.year">达龄</th>
        <th data-field="goodsAllMoney">订单总额</th>
        <th data-field="allRebateAmount">红包总额</th>
        <th data-field="companyNumber">关联商家数</th>
        <th data-formatter="User.operateFormatter" data-events="operateEvents">操作</th>
    </tr>
    </thead>
</table>


<div id="updateUser-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="45%">
    <div class="box-header">
        <h3 class="box-title">修改信息</h3>
    </div>
    <div class="box-body">
        <form role="form" method="post" id="updateUseFrom">
            <input id="id" name="id" type="hidden">
            <div class="form-group">
                <label>用户账号:</label>
                <input type="text" class="form-control " name="account" id="account"
                       required="required" style="width: 50%">
            </div>

            <div class="form-group">
                <label>用户名称:</label>
                <input type="text" class="form-control " name="nickName" id="name"
                       required="required" style="width: 50%">
            </div>

            <div class="form-group">
                <label>用户头像:</label><br/>
                <input type="hidden" name="headPic" id="picture" alt="图片路径">
                <img id="Pic" class="addImage" src="${path}/static/images/commons/img_add.png"
                     width="150" height="150"><br><span style="color: red">请上传图片分辨率为1024 x 768的图片</span>
            </div>
        </form>
    </div>
    <div class="box-footer">
        <button class="btn btn-info" data-event="submit-updateUser">确定</button>
        &nbsp;
        <button class="btn btn-danger close-model">关闭</button>
    </div>
</div>


<div id="queryOrder-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="60%"
     model-left="40%">
    <div class="box box-info">
        <div class="box-body">
            <table id="order"
                   data-toggle="table"
                   data-side-pagination="server"
                   data-pagination="true"
                   data-page-list="[50, 100, 200]">
                <thead>
                <tr>
                    <th data-field="orderNumber">订单编号</th>
                    <th data-field="nickName">用户名</th>
                    <th data-field="bussName">商家</th>
                    <th data-field="goodsMoney">金额</th>
                    <th data-field="orderName">商品名称</th>
                    <th data-formatter="orderState">交易状态</th>
                    <th data-formatter="payType">支付方式</th>
                    <th data-field="created">交易日期</th>
                </tr>
                </thead>
            </table>
            <div class="box-footer">
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>


<div id="userDetail-div" class="slidingmenu box-model box box-info" model-width="70%" model-left="40%">
    <div class="box-header">
        <h3 class="box-title">用户实名认证</h3>
    </div>
    <form role="form" method="post" id="UserFrom">
        <input type="hidden" id="rowId" name="id">
    </form>

    <div class="col-md-3" style="margin-top: 3%">
        <div class="form-group" style="float: left">
            <label style="margin-left: 1%">&nbsp;手持照片:</label><br>
            <img width="200" id="handheldPhotos" src="${path}/static/images/commons/img_add.png"
                 onclick="enlargeImage(this)">
        </div>
    </div>

    <div class="col-md-3" style="margin-top: 3%">
        <div class="form-group" style="float: left">
            <label style="margin-left: 1%">身份证正面:</label><br>
            <img width="200" id="fontCard" src="${path}/static/images/commons/img_add.png"
                 onclick="enlargeImage(this)">
        </div>
    </div>

    <div class="col-md-3" style="margin-top: 3%">
        <div class="form-group" style="float: left">
            <label style="margin-left: 1%">身份证反面:</label><br>
            <img width="200" id="reverseCard" src="${path}/static/images/commons/img_add.png"
                 onclick="enlargeImage(this)">
        </div>
    </div>
    <div class="col-xs-6" style="margin-top: 1%">
        <div class="form-group">
            <label>姓名:</label>
            <input type="text" class="form-control " id="cardName"
                   required="required" style="width: 50%">
        </div>
        <div class="form-group">
            <label>身份证号:</label>
            <input type="text" class="form-control " id="cardId"
                   required="required" style="width: 50%">
        </div>
    </div>
    <div class="col-xs-6" style="margin-top: 8%">
        <div class="box-footer">
            <button class="btn btn close-model" data-event="submit-pass">通过</button>
            &nbsp;
            <button class="btn btn-danger close-model" data-event="submit-reject">拒绝</button>
        </div>
    </div>

</div>
<div id="queryUser-div" class="slidingmenu box-model box box-info" model-width="70%" model-left="40%">
    <div class="box-header">
        <h3 class="box-title">用户实名认证</h3>
    </div>
    <div class="col-md-3" style="margin-top: 3%">
        <div class="form-group">
            <label style="margin-left: 1%">&nbsp;手持照片:</label><br>
            <img width="200" id="photo" src="${path}/static/images/commons/img_add.png" onclick="enlargeImage(this)">
        </div>
    </div>
    <div class="col-md-3" style="margin-top: 3%">
        <div class="form-group">
            <label style="margin-left: 1%">身份证正面:</label><br>
            <img width="200" id="card" src="${path}/static/images/commons/img_add.png" onclick="enlargeImage(this)">
        </div>
    </div>
    <div class="col-md-3" style="margin-top: 3%">

        <div class="form-group">
            <label style="margin-left: 1%">身份证反面:</label><br>
            <img width="200" id="photoCon" src="${path}/static/images/commons/img_add.png" onclick="enlargeImage(this)">
        </div>
    </div>
    <div class="col-xs-6" style="margin-top: 1%">
        <div class="form-group">
            <label>身份证号:</label>
            <input type="text" class="form-control " id="queryCardId"
                   required="required" style="width: 50%">
        </div>
        <div class="form-group">
            <label>姓名:</label>
            <input type="text" class="form-control " id="queryName"
                   required="required" style="width: 50%">
        </div>
    </div>
    <div class="col-xs-6" style="margin-top: 8%">
        <div class="box-footer">
            <button class="btn btn-danger close-model">关闭</button>
        </div>
    </div>

</div>
<div id="queryDetails-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="45%">
    <div class="box box-info">
        <div class="box-body">
            <table id="details"
                   data-toggle="table"
                   data-side-pagination="server"
                   data-pagination="true"
                   data-page-list="[50, 100, 200]">
                <thead>
                <tr>
                    <th data-formatter="sourceType">金额来源</th>
                    <th data-field="balance">金额</th>
                    <th data-field="created">创建时间</th>
                </tr>
                </thead>
            </table>
            <div class="box-footer">
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>


<div id="resetPassword-div" class="slidingmenu box-model box box-info" model-width="45%" model-height="60%">
    <div class="box-header">
        <h3 class="box-title">重置密码</h3>
    </div>
    <div>

        <form role="form" method="post" id="resetFrom">
            <input id="ids" name="id" type="hidden">
            <div class="form-group" style="margin-left:20%;margin-top: 10%">
                <label>重置密码:</label>
                <input type="text" class="form-control " name="pwd" value="123456" required="required" id="pwd"
                       readonly="readonly"
                       style="width: 50%">
            </div>
        </form>
    </div>
    <div style="margin-left: 10%;margin-top: 20%">
        <button class="btn btn-info" data-event="submit-resetPassword">确定</button>
        &nbsp;
        <button class="btn btn-danger close-model" style="margin-left: 50%">关闭</button>
    </div>
</div>

<div id="queryCompany-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="60%"
     model-left="40%">
    <div class="box box-info">
        <div class="box-body">
            <table id="company"
                   data-toggle="table"
                   data-side-pagination="server"
                   data-pagination="true"
                   data-page-list="[50, 100, 200]">
                <thead>
                <tr>
                    <th data-field="id" data-visible="false">编号</th>
                    <th data-field="account">关联商家账号</th>
                    <th data-field="bussName">关联商家名称</th>
                    <th data-field="orderNumber">订单数</th>
                    <th data-field="goodsAllMoney">订单总额</th>
                    <th data-field="allRebateAmount">红包总额</th>
                    <th data-formatter="User.companyOperate" data-events="companyOperateEvents">操作</th>
                </tr>
                </thead>
            </table>
            <div class="box-footer">
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>
<div id="queryCompanyOrder-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="60%"
     model-left="40%">
    <div class="box box-info">
        <div class="box-body">
            <table id="companyOrder"
                   data-toggle="table"
                   data-side-pagination="server"
                   data-pagination="true"
                   data-page-list="[50, 100, 200]">
                <thead>
                <tr>
                    <th data-field="orderNumber">订单号</th>
                    <th data-field="created">交易时间</th>
                    <th data-field="goodsAllMoney">订单金额</th>
                    <th data-field="rebateAmount">红包金额</th>
                    <th data-formatter="User.OrderStatus">状态</th>
                </tr>
                </thead>
            </table>
            <div class="box-footer">
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>

